﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="selectWarehouse.aspx.cs" Inherits="SJZD_AddType" %>
<%
    HttpContext.Current.Response.Buffer = true;
    HttpContext.Current.Response.Expires = 0;
    HttpContext.Current.Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
    HttpContext.Current.Response.AddHeader("pragma", "no-cache");
    HttpContext.Current.Response.AddHeader("cache-control", "private");
    HttpContext.Current.Response.CacheControl = "no-cache";
%> 
<html>
<head id="Head1" runat="server">
<base target="_self"></base>
<title>选择仓库</title>
<link href="../css/adminCss.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/submit.js"></script>
<script type="text/javascript" src="../js/rl.js"></script>
<script type="text/javascript">
function onClose(){
	var WarehouseId="";
	var WarehouseName="";
	for(i=0;i<form1.elements.length;i++){
		if(form1.elements[i].type=="radio"&&form1.elements[i].checked){
			WarehouseId=form1.elements[i].value;
			WarehouseName=document.all("WarehouseName"+form1.elements[i].value).value;
		}
	}
	if(WarehouseId!=""){
		window.returnValue = WarehouseId+"|"+WarehouseName;
	}
	window.close();
}
function rel_onclick() {

	window.close();
}

</script>
</head>
<body style="text-align: center">
    <form id="form1" runat="server" >
    <table width="99%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
    <td width="31" height="22"><img src="../images/module.gif" width="20" height="22"></td>
    <td align="left">选择仓库</td>
    <td  align="right"><!--<font color="red"> [ <a href="javascript:location.href=document.referrer;" ><font color="red">返回</font></a> ]</font>-->
        </td>
  </tr>
</table>
<table width="99%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#3CB6E5" height="5px"></td>
  </tr>
</table>
<div>
	<asp:GridView id="GvData" runat="server" CssClass="gridview" EmptyDataText="没有数据"  AutoGenerateColumns="False" Width="99%" OnRowDataBound="GvData_RowDataBound">
	<PagerSettings Visible="False"  />
	<Columns>
	    <asp:TemplateField HeaderText="选择">
            <ItemTemplate>
            <input type="radio" name="WarehouseId" id="WarehouseId"  value="<%#Eval("WarehouseId")%>"/>
			<input type="hidden" name="WarehouseName<%#Eval("WarehouseId")%>" id="WarehouseName<%#Eval("WarehouseId")%>" value="<%#Eval("WarehouseName")%>">
            </ItemTemplate>
        </asp:TemplateField>
		<asp:BoundField HeaderText="仓库ID" DataField="WarehouseId" >
			<ItemStyle HorizontalAlign="Center"  />
		</asp:BoundField>
		 <asp:BoundField HeaderText="仓库编号" DataField="warebh" >
			<ItemStyle HorizontalAlign="Center"  />
		</asp:BoundField>
		<asp:BoundField HeaderText="仓库名" DataField="WarehouseName" >
			<ItemStyle HorizontalAlign="Center"  />
		</asp:BoundField>
		<asp:BoundField HeaderText="负责人" DataField="WarehouseMan" >
			<ItemStyle HorizontalAlign="Center"  />
		</asp:BoundField>
		<asp:BoundField HeaderText="联系电话" DataField="Phone" >
			<ItemStyle HorizontalAlign="Center"  />
		</asp:BoundField>
		<asp:BoundField HeaderText="仓库地址" DataField="Address" >
			<ItemStyle HorizontalAlign="Center"  />
		</asp:BoundField>
		<asp:BoundField HeaderText="库存" DataField="ProcNum" >
			<ItemStyle HorizontalAlign="Center"  />
		</asp:BoundField>
	</Columns>
	<EmptyDataRowStyle BackColor="White" BorderStyle="Solid" ForeColor="Red" HorizontalAlign="Center"  />
</asp:GridView>
</div><br>

<div class="center">
<input name="submit" type="button" id="submit" value=" 确 定 " class="input1"  onClick="javascript:onClose()">&nbsp;
<input name="rel" type="button" id="rel" value=" 取 消 " class="input1" onclick="return rel_onclick()">
</div>
</form>
</body>
</html>
